package com.example.springboot.service;


import com.example.springboot.Mapper.UserMapper;
import com.example.springboot.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService implements UserMapper {
    @Autowired
    UserMapper userMapper;

    @Override
    public List<User> getUserInfo() {
        return userMapper.getUserInfo();
    }

    @Override
    public int addUser(User user) {
        return userMapper.addUser(user);
    }

    @Override
    public User getUserById(String username) {
        return userMapper.getUserById(username);
    }

    @Override
    public int updateUser(User user) {
        return userMapper.updateUser(user);
    }
}
